package com.jinke.api.modules.third.hyeus.request;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 请求参数类
 */

@Data
@JsonSerialize
public class CreateOrderRequest extends BaseEntity {

    @ApiModelProperty("订单号")
    private String no;

    @ApiModelProperty("产品代码")
    private String product;

    @ApiModelProperty("密度")
    private String freightClass;

    @ApiModelProperty("是否需要签名服务，可以为Boolean或Integer类型")
    private Integer isSignatureService;

    @ApiModelProperty("订单备注")
    private String note;

    @ApiModelProperty("包裹信息")
    private List<Box> boxes;

    @ApiModelProperty("收件人信息")
    private Consignee consignee;

    @ApiModelProperty("发件人信息（可选）")
    private Consignee sender;

    @ApiModelProperty("回调通知地址（可选）")
    private String callbackUrl;

    @Data
    public static class Box {

        @ApiModelProperty("包裹数量")
        private int number;

        @ApiModelProperty(value = "重量（单位：KG，精度：3位小数）", example = "0.000")
        private BigDecimal weight;

        @ApiModelProperty(value = "长度（单位：CM，精度：2位小数）", example = "0.00")
        private BigDecimal length;

        @ApiModelProperty(value = "宽度（单位：CM，精度：2位小数）", example = "0.00")
        private BigDecimal width;

        @ApiModelProperty(value = "高度（单位：CM，精度：2位小数）", example = "0.00")
        private BigDecimal height;

        @ApiModelProperty("参考号（可选）")
        private List<String> referenceNumbers;

        // Getter and setter methods
    }

    @Data
    public static class Consignee {

        @ApiModelProperty("国家代码")
        private String countryCode;

        @ApiModelProperty("州/省")
        private String stateProvince;

        @ApiModelProperty("城市")
        private String city;

        @ApiModelProperty("邮编")
        private String postcode;

        @ApiModelProperty("地址")
        private String address;

        @ApiModelProperty("姓名")
        private String name;

        @ApiModelProperty("公司名称")
        private String companyName;

        @ApiModelProperty("联系方式")
        private String phone;

        // Getter and setter methods
    }


}

